﻿@model SimpleCMS.Models.News

@{
    ViewBag.Title = "新增新闻";
}

<h2>Create</h2>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)

    <fieldset class="form-horizontal">
        <legend>新闻 <small>详细内容</small></legend>
        <div class="control-group">
            @Html.LabelFor(model => model.Title, new { @class = "control-label" })
            <div class="controls">
                <input class = "input-xlarge" placeholder="新闻标题" id="Title" name="Title" type="text"/>
                @Html.ValidationMessageFor(model => model.Title, "新闻标题必填", new { @class = "help-inline" })
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.Content, new { @class = "control-label" })
            <div class="controls">
                @Html.TextAreaFor(model => model.Content)
                @Html.ValidationMessageFor(model => model.Content, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.Genre, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.Genre)
                @Html.ValidationMessageFor(model => model.Genre, "版块必选", new { @class = "help-inline" })
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.Tags, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.Tags, new { @class = "input-xlarge" })
                @Html.ValidationMessageFor(model => model.Tags, null, new { @class = "help-inline" })
            </div>
        </div>
        <div class="form-actions">
            <button type="submit" class="btn btn-primary">创建新闻</button>
            <button class="btn">Cancel</button>
        </div>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
